"""
设备管理应用 URL配置
"""
from django.urls import path
from . import views

app_name = 'devices'

urlpatterns = [
    # 设备管理页面
    path('', views.device_list, name='device_list'),
    path('add/', views.device_add, name='device_add'),
    path('<int:device_id>/', views.device_detail, name='device_detail'),
    path('<int:device_id>/edit/', views.device_edit, name='device_edit'),
    path('<int:device_id>/delete/', views.device_delete, name='device_delete'),
    path('<int:device_id>/control/', views.device_control, name='device_control'),
    
    # 设备品牌管理
    path('brands/', views.brand_list, name='brand_list'),
    path('brands/add/', views.brand_add, name='brand_add'),
    path('brands/<int:brand_id>/', views.brand_detail, name='brand_detail'),
    path('brands/<int:brand_id>/edit/', views.brand_edit, name='brand_edit'),
    path('brands/<int:brand_id>/delete/', views.brand_delete, name='brand_delete'),
    
    # 设备类型管理
    path('types/', views.device_type_list, name='device_type_list'),
    path('types/add/', views.device_type_add, name='device_type_add'),
    path('types/<int:type_id>/', views.device_type_detail, name='device_type_detail'),
    path('types/<int:type_id>/edit/', views.device_type_edit, name='device_type_edit'),
    path('types/<int:type_id>/delete/', views.device_type_delete, name='device_type_delete'),
    
    # 平台凭证管理
    path('credentials/', views.credential_list, name='credential_list'),
    path('credentials/add/', views.credential_add, name='credential_add'),
    path('credentials/<int:credential_id>/', views.credential_detail, name='credential_detail'),
    path('credentials/<int:credential_id>/edit/', views.credential_edit, name='credential_edit'),
    path('credentials/<int:credential_id>/delete/', views.credential_delete, name='credential_delete'),
]